package com.hm.hw1222;

import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class Hw1Handle {

	@ExceptionHandler(Exception.class)
//	@ResponseBody
	public String errorHandle(Exception e,Model model) {
		model.addAttribute("e",e);
		return "hw1222/hw1";
	}
}
